<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@include file="../../common/includeBaseSet.jsp" %>
<%@include file="../../common/includeSystemSet.jsp" %>
<%@include file="../../common/operation_forbid.jsp" %>
<%@include file="../../common/jsVersion.jsp" %>
<!-- 右侧房间信息 -->
<div id="rightRoomDiv">
	<form id="baseRoomForm" method="POST" onsubmit="return false;">
	<div class="widget-main customBtn">
	 <c:forEach var="btn" items="${permitBtn}">
        <c:choose>
		<c:when test="${btn.permission=='estate:projectRoom:edit'}">
		<button type="button" id="btn_roomUpdate" class="btn btn-warning  btn-sm">
			<span class="glyphicon glyphicon-search">编辑</span>
		</button>
		&emsp;
		</c:when>
		<c:when test="${btn.permission=='estate:projectRoom:delete'}">
		<button type="button" id="btn_roomDel" class="btn btn-primary btn-sm">
			<span class="glyphicon glyphicon-minus">删除</span>
		</button>
		</c:when>
		</c:choose>
		</c:forEach>
	
	
		
		
	</div>
	<c:if test="${!empty ar.obj}">
	<input type='hidden' name='roomId' value="${ar.obj.id}" />
	</c:if>
	<c:if test="${!empty ar.obj}">
	<input type='hidden' name='roomStatus' value="${ar.obj.roomStatus}" />
	</c:if>
	<c:if test="${!empty parentName}">
	<input type='hidden' name='parentName' value="${parentName}" />
	</c:if>
	<c:if test="${!empty manageObject}">
	<input type='hidden' name='manageObject' value="${manageObject}" />
	</c:if>
	<c:if test="${!empty phtMap}">
	<input type='hidden' name='phtMap' value="${phtMap}" />
	</c:if>
	</form>
	<c:choose>
	<c:when test="${!empty ar.obj}">
	<table id="unitTable" class="table table-bordered table-hover" >
		<tr>
			<td style="background-color: #D8D8D8; font-size: 16px; font-weight: bold;" colspan="2">房源详情</td>
		</tr>
		<tr>
			<td colspan="2"><b>管理对象&emsp;&emsp;&emsp;</b>&emsp;&emsp;${manageObject}</td>
		</tr>
		<tr>
			<td><b><c:choose><c:when test="${ar.obj.propertyType==1}">公寓</c:when><c:when test="${ar.obj.propertyType==2}">别墅</c:when><c:when test="${ar.obj.propertyType==3}">车位</c:when><c:otherwise>其他</c:otherwise></c:choose>名称&emsp;&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.roomName}</td>
			<td><b>房间编号&emsp;&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.roomCode}</td>
		</tr>
		<tr>
			<td><b>所处楼层&emsp;&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.floor}</td>
			<td>
			<b>房产类型&emsp;&emsp;&emsp;</b>&emsp;&emsp;
			<c:choose>
				<c:when test="${ar.obj.propertyType==1}">公寓</c:when>
				<c:when test="${ar.obj.propertyType==2}">别墅</c:when>
				<c:when test="${ar.obj.propertyType==3}">车位</c:when>
				<c:when test="${ar.obj.propertyType==4}">商铺</c:when>
				<c:when test="${ar.obj.propertyType==5}">写字楼</c:when>
				<c:when test="${ar.obj.propertyType==6}">储藏室</c:when>
				<c:when test="${ar.obj.propertyType==7}">酒店式公寓</c:when>
				
				<c:otherwise>其他</c:otherwise>
			</c:choose>
			</td>
		</tr>
		<tr>
			<td><b>所属户型&emsp;&emsp;&emsp;</b>&emsp;&emsp;${phtMap[ar.obj.houseTypeId]}</td>
			<td><b>计费面积&emsp;&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.billingArea}</td>
		</tr>
		<tr>
			<td><b>建筑面积&emsp;&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.buildingArea}</td>
			<td><b>套内面积&emsp;&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.innerArea}</td>
		</tr>
		<tr>
			<td><b>分摊面积&emsp;&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.sharingArea}</td>
			<td><b>花园面积&emsp;&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.gardenArea}</td>
		</tr>
		<tr>
			<td><b>地上面积&emsp;&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.aboveGroundArea}</td>
			<td><b>地下室面积&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.basementArea}</td>
		</tr>
		<tr>
			<td colspan="2"><b>赠送面积&emsp;&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.freeArea}</td>
		</tr>
		<tr>
			<td colspan="2">
			<b>销售状态&emsp;&emsp;&emsp;</b>&emsp;&emsp;
			<label><input type="checkbox" disabled="disabled" name="chk_roomStatus" value="1" class="FormElement">&nbsp;可售&emsp;</label>
			<label><input type="checkbox" disabled="disabled" name="chk_roomStatus" value="2" class="FormElement">&nbsp;保留&emsp;</label>
			<!-- 根据认筹开关,查看是否需要显示认筹 -->
			<label style="display: ${payDepositOff==true?'none':'block'}"><input type="checkbox" disabled="disabled" name="chk_roomStatus" value="3" class="FormElement">&nbsp;认筹&emsp;</label>
			<label><input type="checkbox" disabled="disabled" name="chk_roomStatus" value="4" class="FormElement">&nbsp;认购&emsp;</label>
			<label><input type="checkbox" disabled="disabled" name="chk_roomStatus" value="5" class="FormElement">&nbsp;签约&emsp;</label>
			<label><input type="checkbox" disabled="disabled" name="chk_roomStatus" value="6" class="FormElement">&nbsp;销控&emsp;</label>
			<label><input type="checkbox" disabled="disabled" name="chk_roomStatus" value="7" class="FormElement">&nbsp;暂不可售&emsp;</label>
			</td>
		</tr>
		<!-- 
		<tr>
			<td><b>预售证编号&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.salesPermissionNo}</td>
			<td><b>预售证领取日期</b>&emsp;&emsp;<fmt:formatDate value="${ar.obj.salesPermissionDate}" pattern="yyyy-MM-dd"/></td>
		</tr>
		 -->
		 <tr>
			<td colspan="2"><b>业&emsp;&emsp;态&emsp;&emsp;&emsp;</b>&emsp;&emsp;${baseCode.codeName}</td>
		</tr>
		<tr>
			<td colspan="2"><b>备&emsp;&emsp;注&emsp;&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.remark}</td>
		</tr>
	</table>
	</c:when>
	<c:otherwise>
	<table id="unitTable" class="table table-bordered table-hover" >
		<tr>
			<td style="background-color: #D8D8D8; font-size: 16px; font-weight: bold;">房间详情</td>
		</tr>
		<tr>
			<td style="text-align: center;"><h1>${ar.resMsg}</h1></td>
		</tr>
	</table>
	</c:otherwise>
	</c:choose>
</div>
<script src="${jypath}/static/js/estate/room/room.js?v=${jsVersion}"></script>
